package GUItest;

import java.awt.Color;
import java.awt.EventQueue;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import javax.swing.table.DefaultTableModel;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JSeparator;
import javax.swing.UIManager;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.BevelBorder;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class Statements_Screen extends JFrame {

	private JPanel contentPane;
	private JTable table;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Statements_Screen frame = new Statements_Screen();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Statements_Screen() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		DefaultTableModel model = new DefaultTableModel(); 
		table = new JTable(model);
		model.addColumn("Date");
		model.addColumn("Ammount");
		model.addColumn("Description");
		model.addColumn("Balance");
		model.addRow(new Object[]{"Date", "Ammount", "Description", "Balance"});
		
		table.setColumnSelectionAllowed(true);
		table.setCellSelectionEnabled(true);
		table.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null));
		table.setBackground(UIManager.getColor("windowBorder"));
		table.setBounds(52, 79, 341, 175);
		contentPane.add(table);
		
		JButton btnNewButton = new JButton("Back");
		btnNewButton.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseReleased(MouseEvent e) {
				main_Screen main = new main_Screen();
				main.setVisible(true);
			}
		});
		btnNewButton.setBounds(6, 6, 117, 29);
		contentPane.add(btnNewButton);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setBounds(341, 40, 52, 27);
		contentPane.add(comboBox);
		
		JLabel lblAccount = new JLabel("Account:");
		lblAccount.setFont(new Font("Lucida Grande", Font.PLAIN, 16));
		lblAccount.setBounds(252, 43, 89, 16);
		contentPane.add(lblAccount);
		
		JLabel lblStatement = new JLabel("Statement");
		lblStatement.setFont(new Font("Lucida Grande", Font.PLAIN, 18));
		lblStatement.setBounds(168, 3, 130, 29);
		contentPane.add(lblStatement);
	}
}
